Containers and DevOps
Learn about application development, both with and without containers, and about web applications.
Application development#
Application development is complicated by the interplay between the application and its environment. One way or another, applications run on an operating system. The operating system contains configuration files, environment variables, and other settings that affect the running of all applications. Containerization, the development of applications in containers, supports DevOps practices by making application development and deployment faster and more reliable.
Web application#
A web application, for example, runs on an OS and is dependent on web server software. Web servers include Tomcat, Apache, IIS, Node.js, and many others. Some applications need a runtime, such as those developed in Java or .NET. The operating systems and all these supporting systems each have configurations that affect the web applications they host. An incorrect configuration can hamper performance or even cause the application to fail entirely.
Consider that most web applications aren’t hosted on just one web server but many. Very busy websites on the public internet are typically supported by hundreds or thousands of web servers, all running to support millions of requests an hour (this is commonly known as a web farm). Each one of those servers has its own set of configurations. How do engineers keep all those configurations consistent so that each web server functions at peak efficiency? Containers provide one very compelling solution.
Application deployment without containers#
Without containers, application deployment only deploys application files, not configuration. The configuration is stored and maintained separately on the servers. This leads to a complication: Engineers can’t be completely assured that the application will perform correctly until after deployment. If one of the configurations is incorrect, nobody knows until after a failure. This is especially problematic in a production environment. Faults and defects should be detected early in the testing process. Testing an application with its configuration from the very beginning of the development process ensures higher quality.
Small changes made directly to servers after they’re provisioned can cause unexpected and unintended changes. Over time, differences between servers in a web farm can creep into the configurations. Configurations begin to vary between servers that should be identical. This is called configuration drift. Configuration drift is very common, especially in organizations with little or no automation.
Application deployment with containers#
Applications developed in containers are developed and deployed with their environment and configuration. Software developers are able to test containers before they’re deployed. If a container functions properly in a development environment, it will function exactly the same way when deployed to other environments. Applications developed this way are more reliable because they’re developed, tested, and versioned together with their configuration.
Docker
Docker, DevOps Katas, and DevOps Practices by Containerization